//
//  AddHuanxinFriendCell.m
//  QinrenManagers
//
//  Created by easaa on 15/8/26.
//  Copyright (c) 2015年 easaa. All rights reserved.
//

#import "AddHuanxinFriendCell.h"
#import "UIImageView+EMWebCache.h"

@implementation AddHuanxinFriendCell

- (void)awakeFromNib {
    // Initialization code
    self.selectView.layer.cornerRadius = 15;
    self.selectView.clipsToBounds = YES;
}

- (void)fillCellWithModel:(FriendModel *)model {
    
    [self.friendIcon sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"chatListCellHead.png"]];
    self.friendNameLabel.text = model.name;
    if (model.isSelected) {
        self.selectView.backgroundColor = DarkGreencolor;
    }else {
        self.selectView.backgroundColor = [UIColor lightGrayColor];
    }

}

- (void)fillCellWithHealthModel:(GroupMemberModel *)healthModel {

    [self.friendIcon sd_setImageWithURL:[NSURL URLWithString:healthModel.icon] placeholderImage:[UIImage imageNamed:@"chatListCellHead.png"]];
    self.friendNameLabel.text = healthModel.customer_truename;
    if (healthModel.isSelected) {
        self.selectView.backgroundColor = DarkGreencolor;
    }else {
        self.selectView.backgroundColor = [UIColor lightGrayColor];
    }


}
- (void)fillCellWithWorkModel:(GroupMemberModel *)workModel {

    [self.friendIcon sd_setImageWithURL:[NSURL URLWithString:workModel.employee_img] placeholderImage:[UIImage imageNamed:@"chatListCellHead.png"]];
    self.friendNameLabel.text = workModel.employee_truename;
    if (workModel.isSelected) {
        self.selectView.backgroundColor = DarkGreencolor;
    }else {
        self.selectView.backgroundColor = [UIColor lightGrayColor];
    }


}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
